-
Notifications
You must be signed in to change notification settings - Fork 121
Bookings: Update Networking layer to support fetching Bookings #16162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bookings: Update Networking layer to support fetching Bookings #16162
Conversation
Generated by 🚫 Danger |
|
|
RafaelKayumov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Pre-approving. Left a couple of questions.
| public let orderID: Int64 | ||
| public let orderItemID: Int64 | ||
| public let parentID: Int64 | ||
| public let productID: Int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the person_counts skipped on purpose? Not sure though what it could be used for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I skipped it since I'm unsure about the structure (sometimes it's an array sometimes dictionary). Since we don't have a clear idea how to use it/what for, I figure we can add it later when needed. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good
|
|
||
| /// WooCommerce Bookings Plugin V1. | ||
| /// | ||
| case wcBookings = "wc-bookings/v2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it v2 or should be v1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will have to use v2 for the MVP. There's a long thread about testing Bookings for the MVP in p1758101141913349-slack-C03L1NF1EA3, but tl;dr you can follow the steps:
- Create a garden site and upload the latest Bookings plugin from trunk
- Install Code Snippets plugin and add this script
define( 'WC_BOOKINGS_NEXT_ENABLED', true );
This would allow you to test the v2 API. However, I was not able to overwrite the Bookings plugin in the garden sites I created so Jorge invited me to his site instead. Let me know if you need an invitation too.

Closes WOOMOB-1234
Description
This PR adds a new model for booking and a new remote for Bookings API endpoints.
Additionally, I moved some enums from extensions to fix issue running
rake generate.Testing steps
Just CI passing is sufficient as the new code isn't used yet.
Testing information
Added unit tests for loading bookings with BookingsRemote.
Screenshots
N/A
RELEASE-NOTES.txtif necessary.